<div class="form">
<?php
$this->widget('application.extensions.jui.EJqueryUiInclude', array('theme'=>'base'));
?>
<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'event-form',
	'enableAjaxValidation'=>false,
	 'htmlOptions' => array('enctype'=>'multipart/form-data'),
)); ?>


	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'E_title'); ?>
		<?php echo $form->textField($model,'E_title',array('size'=>30,'maxlength'=>30)); ?>
		<?php echo $form->error($model,'E_title'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'E_subtitle'); ?>
		<?php echo $form->textField($model,'E_subtitle',array('size'=>30,'maxlength'=>30)); ?>
		<?php echo $form->error($model,'E_subtitle'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'E_startdate'); ?>
		<?php $form->widget('application.extensions.jui.EDatePicker',
              array(
                    'name'=>'Event_E_startdate',
                    'language'=>'en',
                    'attribute' => 'E_startdate',
                    'model' => $model,
                    'mode'=>'imagebutton',
                    'value'=>date('Y-m-d'),
                    'htmlOptions'=>array('size'=>20)
                   )
             ); ?>
		<?php echo $form->error($model,'E_startdate'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'E_enddate'); ?>
		<?php $form->widget('application.extensions.jui.EDatePicker',
              array(
                    'name'=>'Event_E_enddate',
                    'language'=>'en',
                    'attribute' => 'E_enddate',
                    'model' => $model,
                    'mode'=>'imagebutton',
                    'value'=>date('Y-m-d'),
                    'htmlOptions'=>array('size'=>20)
                   )
             ); ?>
		<?php echo $form->error($model,'E_enddate'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'E_regstartdate'); ?>
		<?php $form->widget('application.extensions.jui.EDatePicker',
              array(
                    'name'=>'Event_E_regstartdate',
                    'language'=>'en',
                    'attribute' => 'E_regstartdate',
                    'model' => $model,
                    'mode'=>'imagebutton',
                    'value'=>date('Y-m-d'),
                    'htmlOptions'=>array('size'=>20)
                   )
             ); ?>
		<?php echo $form->error($model,'E_regstartdate'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'E_regenddate'); ?>
		<?php $form->widget('application.extensions.jui.EDatePicker',
              array(
                    'name'=>'Event_E_regenddate',
                    'language'=>'en',
                    'attribute' => 'E_regenddate',
                    'model' => $model,
                    'mode'=>'imagebutton',
                    'value'=>date('Y-m-d'),
                    'htmlOptions'=>array('size'=>20)
                   )
             ); ?>
		<?php echo $form->error($model,'E_regenddate'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'E_multiparticipant'); ?>
		<?php echo $form->checkBox($model,'E_multiparticipant',array('size'=>1,'maxlength'=>1)); ?>
		<?php echo $form->error($model,'E_multiparticipant'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'E_paidevent'); ?>
		<?php echo $form->checkBox($model,'E_paidevent',array('size'=>1,'maxlength'=>1)); ?>
		<?php echo $form->error($model,'E_paidevent'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'E_amount'); ?>
		<?php echo $form->textField($model,'E_amount'); ?>
		<?php echo $form->error($model,'E_amount'); ?>
	</div>
	
	
	<div class="row">
		<?php echo $form->labelEx($model,'E_description'); ?>
		<?php echo $form->textArea($model,'E_description',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'E_description'); ?>
	</div>
	
	<div class="row">
       <b> Upload a new picture</b><br/>
       <?php echo CHtml::activeFileField($model, 'E_picture'); ?>
       
       <?php 
       if(!empty($model['E_picture']))
		echo ($model['E_picture']=='default.jpg')? '<br/> No picture set.': '<br/>Your Current Picture<br/> '.$form->textField($model,'E_picture') ;
       ?>
       </div>
	<br/>
	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>
	


<?php $this->endWidget(); ?>

<?php
 
?>

</div><!-- form -->